import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.evidencer.java.utils.Printer;

/**
 * @Title: HttpServletDemo.java
 * @Package 
 * @Description: TODO
 * @author lyz lyzpoq_gmail_com
 * @date 2014/01/17 8:32:03
 * @version V1.0
 */
@WebServlet(name="HttpServletDemo",urlPatterns="/HttpServletDemo")
public class HttpServletDemo extends HttpServlet {

	/**
	*Title: doGet
	*Description: 
	* @param req
	* @param resp
	* @throws ServletException
	* @throws IOException
	* @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	*/
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		//super.doGet(req, resp);
		Printer.sop(req.getAuthType(),"req.getAuthType()");
		Printer.sop(req.getCharacterEncoding(),"req.getCharacterEncoding()");
		Printer.sop(req.getContentType(),"req.getContentType");
		Printer.sop(req.getContextPath(),"req.getContextPath()");
		Printer.sop(req.getLocalAddr(),"req.getLocalAddr()");
		Printer.sop(req.getLocalName(),"req.getLocalName()");
		Printer.sop(req.getMethod(),"req.getMethod()");
		Printer.sop(req.getPathInfo(),"req.getPathInfo()");
		Printer.sop(req.getPathTranslated(),"req.getPathTranslated()");
		Printer.sop(req.getProtocol(),"req.getProtocol()");
		Printer.sop(req.getQueryString(),"req.getQueryString()");
		Printer.sop(req.getRemoteAddr(),"req.getRemoteAddr()");
		Printer.sop(req.getRemoteHost(),"req.getRemoteHost()");
		Printer.sop(req.getRemoteUser(),"req.getRemoteUser()");
		Printer.sop(req.getRequestedSessionId(),"req.getRequestedSessionId()");
		Printer.sop(req.getRequestURI(),"req.getRequestURI()");
		Printer.sop(req.getScheme(),"req.getScheme()");
		Printer.sop(req.getServerName(),"req.getServerName()");
		Printer.sop(req.getServletPath(),"req.getServletPath()");
	}

	/**
	*Title: doPost
	*Description: 
	* @param req
	* @param resp
	* @throws ServletException
	* @throws IOException
	* @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	*/
	
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		//super.doPost(req, resp);
		this.doGet(req, resp);
	}

	/**
	*Title: doOptions
	*Description: 
	* @param req
	* @param resp
	* @throws ServletException
	* @throws IOException
	* @see javax.servlet.http.HttpServlet#doOptions(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	*/
	
	@Override
	protected void doOptions(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		super.doOptions(req, resp);
	}

	/**
	*Title: doTrace
	*Description: 
	* @param req
	* @param resp
	* @throws ServletException
	* @throws IOException
	* @see javax.servlet.http.HttpServlet#doTrace(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	*/
	
	@Override
	protected void doTrace(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		super.doTrace(req, resp);
	}

	/**
	*Title: service
	*Description: 
	* @param req
	* @param resp
	* @throws ServletException
	* @throws IOException
	* @see javax.servlet.http.HttpServlet#service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
	*/
	
	@Override
	protected void service(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		super.service(req, resp);
	}

}

